//
//  ViewController.m
//  ScanView1
//
//  Created by pengkuncai on 15/4/29.
//  Copyright (c) 2015年 PK. All rights reserved.
//

#import "ViewController.h"
#import "QRCodeGenerator.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.title = @"ScanView1";
    
    UIImageView * imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 50, 300, 300)];
    
    UIImage * towCode = [QRCodeGenerator qrImageForString:@"http://blog.csdn.net/tuyaloveios"imageSize:imageView.bounds.size.width];
    
    UIImage * abelImage = [UIImage imageNamed:@"abel.png"];
    
    imageView.image = [QRCodeGenerator twoDimensionCodeImage:towCode withAvatarImage:abelImage];
    
    [self.view addSubview: imageView];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
